package com.example.springaop.controller;

import com.example.springaop.config.MyAspect;
import lombok.extern.java.Log;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@Slf4j
@RestController
@RequestMapping("/test")
public class TestController {
    @MyAspect
    @RequestMapping("/t1")
    public String test1(){
        log.info("这是t1执行");
        return "t1";
    }

    @RequestMapping("/t2")
    public String test2(){
        log.info("这是t2在执行");
        return "t2";
    }
}
